<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:disp="http://java.sun.com/jsf/composite/display"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <h:outputStylesheet name="styles/generalStyle.css" />
        <title>#{str.addApplication}</title>
        
        <c:if test="#{jobSeeker.loggedin==false}" >
            <meta http-equiv="REFRESH" content="0;url=../page_login.xhtml"/>
        </c:if>
    </h:head>
    <h:body>
        <c:if test="#{jobSeeker.loggedin==true}" >
        <div id="north">
             <disp:page_north head="#{str.addApplication} #{str.stage} 4" />
        </div>
        <div id="center">
            <h:form>
                <h2>#{str.summary}</h2>
                <div style="color:red"><h:messages id="validationErrors" /></div>
                <h3>#{str.personalInformation}</h3>
                <table>
                    <tr>
                        <td>
                            #{str.firstName}
                        </td>
                        <td>
                            #{jobSeeker.firstName}
                        </td>
                    </tr>
                    <tr>
                        <td>
                            #{str.lastName}
                        </td>
                        <td>
                            #{jobSeeker.lastName}
                        </td>
                    </tr>
                    <tr>
                        <td>
                            #{str.eMail}
                        </td>
                        <td>
                            #{jobSeeker.eMailAddress}
                        </td>
                    </tr>
                </table>
                <h3>#{str.yourEarlierCompetences}</h3>
                <table>

                    <tt>
                        <th>#{str.competenceCategory}</th>
                        <th>#{str.monthsOfExperience}</th>
                    </tt>

                    <ui:repeat value="#{jobSeeker.competenceList}" var="competence" varStatus="status">
                        <tr>
                            <td>
                                #{competence.categoryName}
                            </td>
                            <td>
                                #{competence.numberOfMonths}
                            </td>
                        </tr>
                    </ui:repeat>
                </table>
                <h3>#{str.youAreAvailable}</h3>
                <table>
                    <tt>
                        <th>#{str.from}</th>
                        <th>#{str.to}</th>
                    </tt>

                    <ui:repeat value="#{jobSeeker.dateAvailabilityList}" var="dateAvailability" varStatus="status">
                        <tr>
                            <td>
                                #{dateAvailability.startDateString}
                            </td>
                            <td>
                                #{dateAvailability.endDateString}
                            </td>
                        </tr>
                    </ui:repeat> 
                </table>
                <table>
                    <tr>
                        <td>
                            <h:commandLink action="#{jobSeeker.goToStage(3)}">&lt; #{str.previous} </h:commandLink>
                        </td>                
                        <td align="right">
                            <h:commandButton action="#{jobSeeker.accept}" value="#{str.accept}" />
                        </td>
                    </tr>
                </table>
            </h:form>
        </div>
        <div id="south">
            <disp:page_south head="#{str.stage} 4 #{str.of} 4" />
        </div>
      </c:if>
    </h:body>
</html>

